﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using NetMicro.EventBus.Messages;

namespace NetMicro.EventBus
{

    /// <summary>
    /// 失败消息重试策略
    /// </summary>
    public interface IEventRetryPolicy
    {
        /// <summary>
        /// 失败消息接收处理
        /// </summary>
        /// <param name="messageTransfer">消息传输模型</param>
        /// <param name="cancellationToken"></param>
        /// <returns>消息接收处理结果</returns>
        Task OnRetryAsync(MessageTransfer messageTransfer,
            CancellationToken cancellationToken);
    }
}
